<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>论文检索系统</title>

    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/css/mainstyle.css}">
</head>

<body>
    <div th:fragment="commonheader">
        <div class="container-fluid">
            <div class="navbar-header">
                <p class="navbar-brand" style="color: white; font-size: 30px;">论文检索系统</p>
            </div>
            <p class="navbar-text navbar-right" style="color: white;margin-right: 5px;">欢迎您，[[${session.loginName}]]</p>
        </div>
        <div class="container-fluid" th:switch="${session.loginer}">
            <ul class="nav navbar-nav" id="ul_head" style="margin-left: 200px;" th:case="'user'">
                <li id="li_head1"><a th:href="@{/user/findAllPapers}" style="color: white">论文信息管理</a></li>
                <li id="li_head2"><a th:href="@{/user/userInfo}" style="color: white">个人资料管理</a></li>
            </ul>
            <ul class="nav navbar-nav" id="ul_head" style="margin-left: 200px;" th:case="'admin'">
                <li id="li_head1"><a th:href="@{/admin/findAllPapers}" style="color: white">论文信息管理</a></li>
                <li id="li_head2"><a th:href="@{/admin/findAllUsers}" style="color: white">普通用户管理</a></li>
                <li id="li_head3"><a th:href="@{/admin/findAllAdmins}" style="color: white">系统用户管理</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li style="background-color: red; width: 130px; height: 50px; text-align: center; margin-right: 5px;">
                    <a th:href="@{/}" style="color: white"><span class="glyphicon glyphicon-log-out"></span>注销</a>
                </li>
            </ul>
        </div>
    </div>

    <div th:fragment="leftmenu">
        <div class="left-menu" style="margin-top: 10px;" th:switch="${session.function}">
            <div class="col-md-2" th:case="'paperInfoUser'">
                <a href="" class="list-group-item">功能导航</a>
                <a id="a_general" th:href="@{/user/findAllPapers}" class="list-group-item">综合检索</a>
                <a id="a_advanced" th:href="@{/user/findAllPapersMulti}" class="list-group-item">复合检索</a>
                <a id="a_network" th:href="@{/user/networkPage}" class="list-group-item">网络检索</a>
                <a id="a_upload" th:href="@{/paperinfo/upload}" class="list-group-item">上传论文</a>
            </div>
            <div class="col-md-2" th:case="'personInfoUser'">
                <a href="" class="list-group-item">功能导航</a>
                <a id="a_update" th:href="@{/user/userInfo}" class="list-group-item">修改个人信息</a>
            </div>
            <div class="col-md-2" th:case="'paperInfoAdmin'">
                <a href="" class="list-group-item">功能导航</a>
                <a id="a_upload" th:href="@{/paperinfo/upload}" class="list-group-item">论文上传</a>
                <a id="a_search" th:href="@{/admin/findAllPapers}" class="list-group-item">论文检索</a>
            </div>
            <div class="col-md-2" th:case="'userInfoAdmin'">
                <a href="" class="list-group-item">功能导航</a>
                <a id="a_manageUser" th:href="@{/admin/findAllUsers}" class="list-group-item">普通用户管理</a>
            </div>
            <div class="col-md-2" th:case="'adminInfoAdmin'">
                <a href="" class="list-group-item">功能导航</a>
                <a id="a_manageAdmin" th:href="@{/admin/findAllAdmins}" class="list-group-item">管理员信息管理</a>
                <a id="a_modifyPwd" th:href="@{/admin/updateAdminPwd}" class="list-group-item">修改密码</a>
                <a id="a_addAdmin" th:href="@{/admin/addAdmin}" class="list-group-item">新增管理员</a>
            </div>
        </div>
    </div>
</body>

</html>